# eric7.WebBrowser.SpellCheck.ManageDictionariesDialog

Module implementing a dialog to install spell checking dictionaries.

### Global Attributes

None

### Classes

ManageDictionariesDialog | Class implementing a dialog to install spell checking dictionaries.

### Functions

None

## ManageDictionariesDialog

Class implementing a dialog to install spell checking dictionaries.

### Derived from

QDialog, Ui_ManageDictionariesDialog

### Class Attributes

DocumentationDirRole
FilenameRole
LocalesRole
UrlRole

### Class Methods

None

### Methods

ManageDictionariesDialog | Constructor
__checkInstalledDictionaries | Private method to check all installed dictionaries.
__downloadCancel | Private slot to cancel the current download.
__downloadDictionary | Private slot to download a dictionary.
__downloadProgress | Private slot to show the download progress.
__installDictionary | Private slot to install the downloaded dictionary.
__installSelected | Private method to install the selected dictionaries.
__installationFinished | Private method called after all selected dictionaries have been installed.
__listFileDownloaded | Private method called, after the dictionaries list file has been downloaded from the Internet.
__populateList | Private method to populate the list of available plugins.
__reachabilityChanged | Private slot handling reachability state changes.
__uninstallSelected | Private method to uninstall the selected dictionaries.
addEntry | Public method to add an entry to the list.
on_buttonBox_clicked | Private slot to handle the click of a button of the button box.
on_dictionariesList_itemSelectionChanged | Private slot to handle a change of the selection.
on_dictionariesUrlEditButton_toggled | Private slot to set the read only status of the dictionaries URL line edit.
on_locationComboBox_currentTextChanged | Private slot to handle a change of the installation location.

### Static Methods

None

#### ManageDictionariesDialog (Constructor)

ManageDictionariesDialog(writeableDirectories, enforceUnencryptedDownloads=False, parent=None, )

Constructor

writeableDirectories (list of str)
  list of writable directories
enforceUnencryptedDownloads (bool (optional))
  flag indicating to perform unencrypted downloads (defaults to False)
parent (QWidget (optional))
  reference to the parent widget (defaults to None)

#### ManageDictionariesDialog.__checkInstalledDictionaries

__checkInstalledDictionaries()

Private method to check all installed dictionaries.

Note: A dictionary is assumed to be installed, if at least one of its binary dictionaries (*.bdic) is found in the selected dictionaries location.

#### ManageDictionariesDialog.__downloadCancel

__downloadCancel()

Private slot to cancel the current download.

#### ManageDictionariesDialog.__downloadDictionary

__downloadDictionary()

Private slot to download a dictionary.

#### ManageDictionariesDialog.__downloadProgress

__downloadProgress(done, total)

Private slot to show the download progress.

done (int)
  number of bytes downloaded so far
total (int)
  total bytes to be downloaded

#### ManageDictionariesDialog.__installDictionary

__installDictionary(reply)

Private slot to install the downloaded dictionary.

reply (QNetworkReply)
  reference to the network reply

#### ManageDictionariesDialog.__installSelected

__installSelected()

Private method to install the selected dictionaries.

#### ManageDictionariesDialog.__installationFinished

__installationFinished()

Private method called after all selected dictionaries have been installed.

#### ManageDictionariesDialog.__listFileDownloaded

__listFileDownloaded(reply)

Private method called, after the dictionaries list file has been downloaded from the Internet.

reply (QNetworkReply)
  reference to the network reply

#### ManageDictionariesDialog.__populateList

__populateList()

Private method to populate the list of available plugins.

#### ManageDictionariesDialog.__reachabilityChanged

__reachabilityChanged(reachability)

Private slot handling reachability state changes.

reachability (QNetworkInformation.Reachability)
  new reachability state

#### ManageDictionariesDialog.__uninstallSelected

__uninstallSelected()

Private method to uninstall the selected dictionaries.

#### ManageDictionariesDialog.addEntry

addEntry(short, filename, url, documentationDir, locales)

Public method to add an entry to the list.

short (str)
  data for the description field
filename (str)
  data for the filename field
url (str)
  download URL for the dictionary entry
documentationDir (str)
  name of the directory containing the dictionary documentation
locales (list of str)
  list of locales

#### ManageDictionariesDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot to handle the click of a button of the button box.

button (QAbstractButton)
  reference to the button pressed

#### ManageDictionariesDialog.on_dictionariesList_itemSelectionChanged

on_dictionariesList_itemSelectionChanged()

Private slot to handle a change of the selection.

#### ManageDictionariesDialog.on_dictionariesUrlEditButton_toggled

on_dictionariesUrlEditButton_toggled(checked)

Private slot to set the read only status of the dictionaries URL line edit.

checked (bool)
  state of the push button

#### ManageDictionariesDialog.on_locationComboBox_currentTextChanged

on_locationComboBox_currentTextChanged(_txt)

Private slot to handle a change of the installation location.

_txt (str)
  installation location (unused)

Up